package com.example.demo.service;

import com.example.demo.entity.ArtInfo;
import com.example.demo.entity.UserInfo;
import com.example.demo.mapper.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author CY
 * @date 2023/03/14 01:15
 **/
@Service
public class UserService {
    @Autowired
    private UserMapper mapper;

    public Integer addUser(String username, String password) {
        return mapper.addUser(username, password);
    }

    public UserInfo login(String username, String password) {
        return mapper.login(username, password);
    }

    public UserInfo getPasswordByName(String username) {
        return mapper.getPasswordByName(username);
    }

    public UserInfo getUserinfoByArtId(Integer id) {
        return mapper.getUserinfoByArtId(id);
    }


}
